package com.camtc.camcenter.config.jwt;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 安全用户模型
 *
 * @author
 * @date
 */
public class JwtUserDetails extends User {

    private static final long serialVersionUID = 1L;

    /**
     * Jwt 用户实体
     *
     * @param username    用户名
     * @param passWord    密码
     * @param authorities 权限集合
     */
    public JwtUserDetails(String username, String passWord, Collection<? extends GrantedAuthority> authorities) {
        super(username, passWord, authorities);
    }

    /**
     * Jwt 用户实体
     *
     * @param username 用户名
     * @param password 密码
     * @param enabled 是否可用
     * @param accountNonExpired
     * @param credentialsNonExpired
     * @param accountNonLocked
     * @param authorities 权限集合
     */
    public JwtUserDetails(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }
}
